home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / MATHS / ARCAUT / Automatons / Sound < prev    next >
Text File  |  1991-07-27  |  1KB  |  39 lines

  1. AUTOMATON*
  2.  
  3.   Sound_Waves
  4.  
  5.   This uses the HPP_Gas model to perform an experiment. A uniform gas is set
  6.   up & into this inserted a compressed region (represented by a solid block
  7.   of particles); this corresponds to the air surrounding the source of a loud
  8.   burst of noise. As the automaton runs, we observe the compressive
  9.   longitudinal wave spreading out from the centre; notice how we are
  10.   temporarily left with a vacuum in the centre as the outward bound gas
  11.   overshoots. With difficulty you may also be able to see that the incoming
  12.   ripple which forms, then compresses the central region & bounces back out,
  13.   to create a secondary outward bound wave front of lower intensity than the
  14.   first. If you use a relatively small window (say 128x128) you will also
  15.   observe patterns formed by the original wavefront wrapping around &
  16.   interfering with the other waves.
  17.  
  18. INITIALISATION*
  19.  
  20.   10DEF PROCdo
  21.   20*SetEval wrap on
  22.   30*SetEval neig margolus
  23.   40ENDPROC
  24.  
  25. SCREEN*
  26.  
  27.   10DEF PROCdo
  28.   20PROCsoup(255,1,.5)
  29.   30c%=FNacol(255):GCOL c%AND63 TINT c%
  30.   40CIRCLE FILL 0,0,80
  31.   50ENDPROC
  32.  
  33. CODE*
  34.  
  35. ( READ_NEIG
  36.   CELL OPP = IF (CW CCW = IF (CELL CW <> IF (CW ==)))
  37.                                             OPP ==    )
  38.  
  39. END*